package org.inspursc.s0517.health.evaluation.dto;

import lombok.Data;


import java.util.ArrayList;
import java.util.List;

/**
 * @author B_Dream
 * @version 2018/5/18 15:02
 */
@Data
public class QuestionCategoryDTO  {



    private Integer id;
    /**
     * 父ID
     */
    private Integer parentId;

    /**
     * 分类名字
     */
    private String name;
    /**
     * 说明描述
     */
    private String description;
    /**
     * 是否可用
     */
    private Boolean disabled;


    private int typeId;    // for distinguish question

    public void setTypeId(int typeId) {
        this.typeId = typeId;
    }




    private List<QuestionCategoryDTO> children = new ArrayList<>();

    public void setEntity(QuestionCategoryDTO module) {
        setId(module.getId());
        setParentId(module.getParentId());
        setName(module.getName());
        setDescription(module.getDescription());
        setDisabled(module.getDisabled());
        setTypeId(module.getTypeId());
    }

    public void addChildren(QuestionCategoryDTO module) {
        this.children.add(module);
    }

    private List<QuestionDTO> questions ;

    public void addQuestion(QuestionDTO dtos) {
        this.questions.add(dtos);
    }


}
